package com.lxw.multidb.modules.sql.dao;

import com.lxw.multidb.modules.sql.entity.DbConnection;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

/**
 * DbConnectionDao
 *
 * @author lxw
 * @version V1.0
 * @date 2025/10/30 16:42
 */
public interface DbConnectionDao extends JpaRepository<DbConnection, Integer>, JpaSpecificationExecutor<DbConnection> {

    /**
     * 根据 host 和 port 判断是否存在
     *
     * @param host host
     * @param port port
     * @return 是否存在
     */
    boolean existsByHostAndPort(String host, int port);
}
